package top.chenfu.service.goods.controller;

import top.chenfu.common.entity.TbBrand;
import top.chenfu.service.goods.service.TbBrandService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 品牌表(TbBrand)表控制层
 *
 * @author 臣服
 * @since 2020-03-03 15:03:42
 */
@RestController
@RequestMapping("tbBrand")
public class TbBrandController {
    /**
     * 服务对象
     */
    @Resource
    private TbBrandService tbBrandService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne/{id}")
    public TbBrand selectOne(@PathVariable Integer id) {
        return this.tbBrandService.queryById(id);
    }


    @GetMapping("ex")
    public void ex() {
        System.out.println("ex");
        float s =5/0;
    }

}